package com.hopscotch.util;

import lombok.Data;

@Data
public class R {
    private Integer code;
    private String msg;
    private Object data;

    public static R success(Object data){
        R r = new R();
        r.code = 200;
        r.msg = "请求成功";
        r.data = data;
        return r;
    }
    public static R fail(){
        R r = new R();
        r.code = 600;
        r.msg = "请求失败";
        return r;
    }
}
